#include <iostream>
#include <algorithm>
#include <random>
#include <chrono>

int main() {
    int arr[9] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
    unsigned seed = std::chrono::system_clock::now().time_since_epoch().count();
    std::shuffle(std::begin(arr), std::end(arr), std::default_random_engine(seed));
    for (int i = 0; i < 9; i++) {
        std::cout << arr[i] << " ";
    }
    std::shuffle(std::begin(arr), std::end(arr), std::default_random_engine(seed));
    for (int i = 0; i < 9; i++) {
        std::cout << arr[i] << " ";
    }
    return 0;
}
